ds_stack_create

Creates a new stack, returning its id.

语法:

ds_stack_create();


返回: Real(实数)


描述

This function will create a new stack data-structure and return the index value. This value should be stored in a variable and used in all further function calls relating to the stack.

重要!创建数据结构时,用于标识它的索引值是从0开始的整数值。这意味着不同类型的数据结构可以具有相同索引值,所以如果有疑问你应该使用ds_exists访问它们之前的功能。还要注意,索引是可以被重新利用的,因此之后新创建的索引值可能会使用被破坏的数据结构索引值。


例如:

stack = ds_stack_create();

This will create a new stack and assign its index id to the instance variable "stack".


上一页: Stacks
下一页: ds_stack_destroy
© Copyright YoYo Games Ltd. 2018 All Rights Reserved